package sysu.el.audit;


public class Max2IntDes<T> extends Max2Int{
	public T des1, des2;
	public Max2IntDes(int init){
		super(init);
	}
	
	public Max2IntDes(){
		this(Integer.MIN_VALUE);
	}
	
	public void reset(){
		this.reset(Integer.MIN_VALUE);
	}
	
	public void reset(int init){
		super.reset(init);
		des1 = null;
		des2 = null;
	}
	
	public void sample(int sam, T t){
		if (sam > this.ans1){
			this.ans2 = this.ans1;
			this.des2 = this.des1;
			this.ans1 = sam;
			this.des1 = t;
		}
		else if (sam > this.ans2){
			this.ans2 = sam;
			this.des2 = t;
		}
	}

	public static Max2Int Ins = new Max2Int();
}

